#include "ZigbusItem.h"

ZigbusItem::ZigbusItem()
{
    size = -1;
    value = -1;
}

ZigbusItem::ZigbusItem(int value, int size)
{
    this->size = size;
    this->value = value;
}

ZigbusItem::ZigbusItem(const ZigbusItem &other)
{
    this->size = other.size;
    this->value = other.value;
}

ZigbusItem& ZigbusItem::operator =(const ZigbusItem& other)
{
    this->size = other.size;
    this->value = other.value;
    return *this;
}

bool ZigbusItem::equals(const ZigbusItem &other) const
{
    return (this->size == other.size && this->value == other.value);
}

bool operator==(const ZigbusItem& a, const ZigbusItem& b)
{
    return a.equals(b);
}

bool operator!=(const ZigbusItem& a, const ZigbusItem& b)
{
    return !(a.equals(b));
}
